package com.asset.salesforce.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="view_query")
public class ViewQuery implements Serializable{
	
 private Integer id;
 private String fieldName;
 private LogicalOperators queryOperatorId;
 private String queryValue;
 private View viewId;
 private String dateType;
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE ,generator="view_query_id_seq")
	@SequenceGenerator(name="view_query_id_seq",sequenceName="view_query_id_seq",allocationSize=1)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name="field_name")
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	@ManyToOne
	@JoinColumn(name="query_operator_id")
	public LogicalOperators getQueryOperatorId() {
		return queryOperatorId;
	}
	public void setQueryOperatorId(LogicalOperators queryOperatorId) {
		this.queryOperatorId = queryOperatorId;
	}
	
	@Column(name="query_value")
	public String getQueryValue() {
		return queryValue;
	}
	public void setQueryValue(String queryValue) {
		this.queryValue = queryValue;
	}
	
	@ManyToOne
	@JoinColumn(name="view_id")
	public View getViewId() {
	return viewId;
	}
	public void setViewId(View viewId) {
		this.viewId = viewId;
	}
	/**
	 * author hisham
	 * @return the dateType
	 */
	@Column(name="view_date")
	public String getDateType() {
		return dateType;
	}
	/**
	 * @param dateType the dateType to set
	 */
	public void setDateType(String dateType) {
		this.dateType = dateType;
	}
}
